import argparse
import json
import math
import os, cv2

import numpy as np
from tqdm import tqdm


parser = argparse.ArgumentParser('rec')
parser.add_argument("--txt_1", type=str, default='/home/train_data/det/vin_210611_9000/Label.txt')
parser.add_argument("--txt_2", type=str, default='/home/train_data/det/vin_210628_20000_sort_roLabel/Label.txt')
parser.add_argument("--savepath", type=str, default='/home/train_data/det/vin/Label.txt')

args = parser.parse_args()


def connect(file1,file2,savepath):
    f = open(savepath,"w",encoding="utf-8")
    f1 = open(file1,"r",encoding='utf-8').readlines()
    f2 = open(file2,"r",encoding="utf-8").readlines()
    for i in f1:
        f.write(i)
    for i in f2:
        f.write(i)
    f.close()

connect(args.txt_1,args.txt_2,args.savepath)